﻿app.controller("PictureController", function ($scope, $http, $routeParams, $location) {
    $scope.getOnePict = function (id) {
        $http({ method: "GET", url: "api/ApiPicture/" + id })
            .success(function (picture) {
            $scope.Picture = picture;
        })
    };
    $scope.updatePicture = function (picture) {
        $http({ method: "PUT", url: "api/ApiPicture/" + $routeParams.id, data: $scope.Picture })
            .success(function (gadgetId) {
                $location.path("/admin_product_details/" + gadgetId);
            })
    };
    $scope.getOnePict($routeParams.id);
})